const path = require('path');
const webpack = require('webpack');

module.exports = {
    mode : 'production',//'development',
    devtool: 'inline-source-map',
    entry: {
        adapter: './public/js/adapter.js',
        device: './public/js/device.js',
        browser: './public/js/browser.js',
        chat: './public/js/chat.js',
        htree: './public/js/htree.js',
        taginput: './public/js/taginput.js',
        relatechecks: './public/js/relatechecks.js',
        manageEverything: './public/js/manageEverything.js',
		wechatsetshare: './public/js/wechatsetshare.js'
    },
    output: {
        filename: '[name].js',
        path: path.resolve(__dirname, './public/res'),
        publicPath: '/'
    },
    plugins: [
    ],
    module: {
        rules: [
            {
                test: /\.css$/,
                use: [
                    'style-loader',
                    'css-loader'
                ]
            },
            {
                test: /\.(png|jpe?g|gif|tiff?|svg|ico|icns|bmp|webp)$/,
                use: [
                    'file-loader'
                ]
            },
            {
                test: /\.(woff|woff2|eot|ttf|otf)$/,
                use: [
                    'file-loader'
                ]
            },
            {
                test: /\.(csv|tsv)$/,
                use: [
                    'csv-loader'
                ]
            },
            {
                test: /\.xml$/,
                use: [
                    'xml-loader'
                ]
            }
        ]
    }
};